package it.cast.wechat.pojo;

import it.cast.wechat.dto.OrderItemVo;

public class OrderItem {
    private String orderItemId;

    private Integer count;

    private Double subtotal;

    private String productId;

    private String orderId;

    public String getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(String orderItemId) {
        this.orderItemId = orderItemId == null ? null : orderItemId.trim();
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getSubtotal() {
        return subtotal;
    }

    public void setSubtotal(Double subtotal) {
        this.subtotal = subtotal;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId == null ? null : productId.trim();
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }

    public OrderItemVo builderOrderItemVo(){
        OrderItemVo orderItemVo = new OrderItemVo();
        orderItemVo.setCount(this.count);
        orderItemVo.setOrderId(this.orderId);
        orderItemVo.setOrderItemId(this.orderItemId);
        orderItemVo.setSubtotal(this.subtotal);
        return orderItemVo;
    }
}